<script setup lang="ts">
import card_back from '@/assets/card-back.png';
// 获取
</script>
<template>
  <div class="home-video-item">
    <a href="#" class="home-video-link" target="_blank">
      <img class="home-video-cover" :src="card_back" alt="item.title" />
      <i class="video-btn"></i>
    </a>
    <ul class="newsList">
      <li class="newsList-item">
        <div class="date">
          <h2 class="date-day">02</h2>
          <p class="date-info">Apr 2021</p>
        </div>
        <div class="news">
          <h2 class="news-info">
            蜘蛛侠数据服务平台发布，基于openLooKeng引擎的数据服务
          </h2>
          <span class="news-author">阿奇@汪汪队</span
          ><span class="news-date">2022-02-16</span>
        </div>
      </li>
      <li class="newsList-item">
        <div class="date">
          <h2 class="date-day">02</h2>
          <p class="date-info">Apr 2021</p>
        </div>
        <div class="news">
          <h2 class="news-info">
            蜘蛛侠数据服务平台发布，基于openLooKeng引擎的数据服务
          </h2>
          <span class="news-author">阿奇@汪汪队</span
          ><span class="news-date">2022-02-16</span>
        </div>
      </li>
      <li class="newsList-item">
        <div class="date">
          <h2 class="date-day">02</h2>
          <p class="date-info">Apr 2021</p>
        </div>
        <div class="news">
          <h2 class="news-info">
            蜘蛛侠数据服务平台发布，基于openLooKeng引擎的数据服务
          </h2>
          <span class="news-author">阿奇@汪汪队</span
          ><span class="news-date">2022-02-16</span>
        </div>
      </li>
    </ul>
  </div>
</template>
<style lang="scss" scoped>
.newsList {
  &:hover {
    background: var(--theme-card-hover);
    box-shadow: var(--theme-shadow-hover);
  }
  display: grid;
  margin-left: 24px;
  background-color: #fff;
  &-item {
    &:hover {
      background: var(--theme-card-hover);
      box-shadow: var(--theme-shadow-hover);
    }
    display: flex;
    padding: 24px;
    .date {
      text-align: center;
      height: 50px;
      width: 50px;
      background-color: #dbeeff;
      &-day {
        font-size: 22px;
        color: #0d8dff;
      }
      &-info {
        font-size: 12px;
        color: #0d8dff;
      }
    }
    .news {
      margin-left: 24px;
      &-info {
        font-size: 18px;
        font-weight: normal;
        color: #000000;
        margin-bottom: 16px;
      }
      &-author {
        font-size: 14px;
        color: #555555;
        float: left;
      }
      &-date {
        font-size: 14px;
        color: #555555;
        float: right;
      }
    }
  }
}
.home-video-item {
  display: inline-flex;
  position: relative;
  padding: 2px 0;
  .home-video-cover {
    height: 405px;
    width: 695px;
    object-fit: cover;
  }
  .home-video-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--theme-card-bg);
    box-shadow: var(--theme-shadow);
    height: 100%;

    &:hover {
      background: var(--theme-card-hover);
      box-shadow: var(--theme-shadow-hover);
    }
    .video-btn {
      width: 72px;
      height: 72px;
      background: url('../../assets/video-btn.png') no-repeat center/cover;
      display: block;
      position: absolute;
      top: 42%;
      left: 26%;
      transform: translate(-50%);
    }
    .title {
      color: var(--theme-title);
      font-size: 14px;
      padding: 12px;
      line-height: 24px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      width: 90%;
      text-align: center;
    }
  }
}
</style>
